package ae.pcfc.cldos.online.common.manager.provider;

import java.util.Map;

import ae.pcfc.cldos.online.common.manager.BaseManager;
import ae.pcfc.cldos.online.common.manager.DataTransferManager;
import ae.pcfc.cldos.online.common.strategy.transfer.ITransferToGS;
import ae.pcfc.cldos.online.common.vo.TransferDataVO;

/**
 * 
 * @author arosa
 *
 */
public class DataTransferManagerImpl extends BaseManager implements DataTransferManager {

	/*Key - process code, value - ref to transfer strategy*/
	private Map<String, ITransferToGS> transferStrategies;
	
	public void setTransferStrategies(Map<String, ITransferToGS> transferStrategies) {
		this.transferStrategies = transferStrategies;
	}
	
	public String transferAppDateToOfflineSystem(TransferDataVO transferDataVO) {
		return transferStrategies.get(transferDataVO.getAppMetaData().getProcessCode())
				.transferToGS(transferDataVO);
	}

}
